package Test_0808;
public class Test {
    interface IA{
        void test1();
    }
    public static void main(String[] args) {
        //实现接口并重写
        IA a=new IA(){
            @Override
            public void test1() {
                System.out.println("。");
            }
        };
        a.test1();
    }
    public void test(){
        //局部内部类
        class Inner{
            public int a=1;
            public void fun(){
                System.out.println("...");
            }
        }
        //局部内部类的实例化
        Inner inner=new Inner();
        inner.fun();
    }
    public static void main1(String[] args) {
       /* Outclass.InnerClass inner=new Outclass.InnerClass();//内部类*/
       //调用静态内部类中的方法
      /*  inner.fun();*/
      /*  Outclass outclass=new Outclass();//外部类
       Outclass3.InnerClass1 inner2=outclass.new InnerClass1();*/
        //实例内部类的实例化：要先实例化外部类，再进行对内部类的实例化
       /* Outclass3 outclass=new  Outclass3();
        Outclass3.InnerClass1 inner2=outclass.new InnerClass1();
        inner2.fun();
        Test test =new Test();*/
       /* new Out(){

        }.test();*/
    }

}

